package com.dgut.lotterySystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ActivityPrizeEnum {
    INIT(1,"初始化"),
    COMPLETED(2,"已被抽取");

    private Integer code;
    private String message;

    public static ActivityPrizeEnum forName(String name){
        for (ActivityPrizeEnum activityPrizeEnum:ActivityPrizeEnum.values()) {
            if(activityPrizeEnum.name().equalsIgnoreCase(name)) return activityPrizeEnum;//通过比较字母是否相同，返回对象
        }
        return null;
    }
}
